#!/usr/bin/env python

import os

class ConfigParser():
    def __init__(self, raw_file) -> None:
        self.raw_file_path = os.path.join(raw_file, "conf.ini")
        self.raw_file_content = {}
        self.__parse__()

    def __parse__(self):
        with open(self.raw_file_path, 'r') as rawf:
            for line in rawf.readlines():
                if line.startswith('#'):
                    continue
                kvs = line.split("=")
                self.raw_file_content.setdefault(kvs[0], kvs[1])
  
    def get_browser_kind(self) -> str:
        return self.raw_file_content.get('BrowserKind')
    
    def get_username(self) -> str:
        return self.raw_file_content.get('Username')

    def get_password(self) -> str:
        return self.raw_file_content.get('Password')